-- GENERATED SPELL FOR [Void Lord] --


function spell0_32230(pUnit, Event) --@Shroud of Darkness,Self--
pUnit:FullCastSpellOnTarget(59745,pUnit)
pUnit:RegisterEvent('Sorts_32230', 7000, 1)
end

function spell1_32230(pUnit, Event) --@Summon Void Sentry,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(54369,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_32230', 1, 1)
end

function spell2_32230(pUnit, Event) --@Void Shift,n/a--
pUnit:FullCastSpellOnTarget(59743,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32230', 5000, 1)
end

function Sorts_32230(pUnit, Event)
local choix_sorts_32230 = math.random(0, 2)
if choix_sorts_32230 == 0 then
pUnit:RegisterEvent('spell0_32230', 1, 1)
end
if choix_sorts_32230 == 1 then
pUnit:RegisterEvent('spell1_32230', 1, 1)
end
if choix_sorts_32230 == 2 then
pUnit:RegisterEvent('spell2_32230', 1, 1)
end
end

function mob32230_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32230', math.random(1500, 3000), 1)
end

function mob32230_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32230_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32230_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32230, 1, 'mob32230_Action')
RegisterUnitEvent(32230, 2, 'mob32230_Leave')
RegisterUnitEvent(32230, 3, 'mob32230_Kill')
RegisterUnitEvent(32230, 4, 'mob32230_Die')
